An application running on a computer may expand the memory capabilities of that computer by implementing a virtual machine. The virtual machine may be a virtual operating system run by the actual operating system of the computer, either as a hardware virtualization or a software emulation. The virtual machine may divide a guest memory into a set of guest memory pages, just as the computer may divide the actual memory into a set of system memory pages. A guest memory page of the guest memory may be backed by a system memory page.
The number of system memory pages assigned to a virtual machine may be smaller than the number of guest memory pages used by the virtual machine. The virtual machine may use second level paging to back a guest memory page that has yet to be assigned a system memory page. In second level paging, when a guest memory page is to perform a memory operation and all the system pages are in use, a previously used system memory page may have the data stored on it written to the computer hard drive and the guest memory page assigned to the now freed system memory page.